<html>
<head><meta charset="utf-8"><title>union and repr(C) · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/union.20and.20repr(C).html">union and repr(C)</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="136485168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/union%20and%20repr%28C%29/near/136485168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/union.20and.20repr(C).html#136485168">(Oct 25 2018 at 15:26)</a>:</h4>
<p>Forking off from <a href="#narrow/stream/136281-wg-unsafe-code-guidelines/subject/meeting.202018-10-25/near/136484819" title="#narrow/stream/136281-wg-unsafe-code-guidelines/subject/meeting.202018-10-25/near/136484819">here</a>, <span class="user-mention" data-user-id="120791">@RalfJ</span> yes, all I meant was that we should note in the <code>#[repr(C)]</code> section that this enables ABI compatibility. I agree it's true for all things. Not a big deal, but it also seems just worth mentioning lest anyone be worried/confused</p>



<a name="136485179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/union%20and%20repr%28C%29/near/136485179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/union.20and.20repr(C).html#136485179">(Oct 25 2018 at 15:26)</a>:</h4>
<p>ack, also see what I wrote in the PR</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>